class Item extends Sprite
{
  protected Player target;
  protected PImage graphic;
  protected Cube item;
  protected Terrain terrain;
  
  public Item(PVector location, Player target, Terrain terrain)
  {
     this.location = location;
     this.target = target;
     this.terrain = terrain;
     this.spriteSize = 2;
     this.health = 150;
  }
  
  public void act(){}
  
  public void draw()
  {
    location = terrain.update(location.x, location.z);
    translate(location.x, location.y, location.z);
    item.draw();
    health--;
  }
  
  public void use()
  {
    health = 0;
    act(); 
  }
}
